<template>
  <div class="cart">
    <i :class="icon"></i>
    <div>
      <div class="number">{{ number }}</div>
      <div class="sub">{{ subTitle }}</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "Cart",
  props: {
    /**
     * 图标
     */
    icon: String,
    /**
     * 数字
     */
    number: Number,
    /**
     * 子标题
     */
    subTitle: String,
    /**
     * 颜色
     */
    color:String,
  },
};
</script>

<style lang="scss" scoped>
.cart {
  padding: 20px;
  background: white;
  border-radius: 3px;
  display: flex;
  align-content: center;
  transition: 0.2s linear;

  &:hover {
    box-shadow: 0 0 10px rgb(199, 195, 195);
  }

  i {
    width: 40px;
    height: 40px;
    display: inline-block;
    text-align: center;
    line-height: 40px;
  }
  .number {
    font-size: 24px;
    font-weight: 500;
  }
  .sub {
    font-size: 13px;
    font-weight: 400;
    color: #6c757d;
  }
}
</style>